home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
NetNews Offline 2
/
NetNews Offline Volume 2.iso
/
news
/
comp
/
std
/
c
/
453
< prev
next >
Wrap
Text File
|
1996-08-06
|
2KB
|
33 lines
Newsgroups: comp.std.c
Path: phcoms4.seri.philips.nl!panther!baynes
From: baynes@ukpsshp1.serigate.philips.nl (Stephen Baynes)
Subject: Re: sizeof(char) ~= sizeof(float)
Sender: news@ukpsshp1.serigate.philips.nl (account for localnews)
Message-ID: <DnFr78.1wo@ukpsshp1.serigate.philips.nl>
Date: Tue, 27 Feb 1996 13:09:08 GMT
References: <WALD.96Feb24131532@woodpecker.lcs.mit.edu> <4gr3d1$dca@usenet.pa.dec.com> <TANMOY.96Feb25203514@qcd.lanl.gov>
Organization: Philips Semiconductors, Southampton, UK
X-Newsreader: TIN [version 1.2 PL2]
Tanmoy Bhattacharya (tanmoy@qcd.lanl.gov) wrote:
: In article <4gr3d1$dca@usenet.pa.dec.com>
: diamond@tbj.dec.com (Norman Diamond) writes:
<snip - copying data by using chars of different sorts vs memcpy >
: This was a free-standing implementation, and memcpy may be absent. (In
: a hosted implementation, as all read/write is done as if through
: getc/putc which handles unsigned char values, and binary files written
: out must be read back unchanged, the situation is impossible).
That read/write is done by getc/putc does not imply very much about copying
chars. I don't see any requirement that fwrite/fread use one putc/getc per
byte(ie char) of memory. Fwrite could use one per bit writing the values 'Y' or
'N' if it wanted so long as fread will read it back again. My understanding
is that the use of getc/putc means you can write a file with fwrite, copy it
with getc/putc and read the copy with fread to get what you started with.
--
Stephen Baynes baynes@ukpsshp1.serigate.philips.nl
Philips Semiconductors Ltd
Southampton My views are my own.
United Kingdom